package com.kunge2013.chatbi.embedding;

import dev.langchain4j.model.embedding.onnx.allminilml6v2.AllMiniLmL6V2EmbeddingModel;
import org.springframework.ai.embedding.EmbeddingModel;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author kunge2013
 * @Description 自定义embding
 * @Date 2024/11/10 16:32
 * @Version 1.0
 */
@Configuration
public class SelfEmbeddingModelConfig {
    @Bean
    public EmbeddingModel embeddingModel() {
        AllMiniLmL6V2EmbeddingModel model = new AllMiniLmL6V2EmbeddingModel();
        return new SelfEmbeddingModel(model);
    }
}
